import request from '@/utils/request'


export default{
  //(1)医院设置列表方法
  getHospSetList(current,limit,searchObj){
    return request({
      url: `/admin/hosp/hospitalSet/findPage/${current}/${limit}`,
      method: 'post',
      data: searchObj //使用json的形式传入
    })
  },
  //(2)删除医院设置方法(自己取的名  然后引入后端接口)
  deleteHospSet(id){
    return request({
      url: `/admin/hosp/hospitalSet/${id}`,
      method: 'delete'
    })
  },
  //(3)批量删除的方法
  batchRemoveHospSet(idList){
    return request({
      url: `/admin/hosp/hospitalSet/removeHospitalSet`,
      method: 'delete',
      data: idList
    })
  },

  //(4)锁定和取消锁定
  lockHospSet(id,status){
    return request({
      url: `/admin/hosp/hospitalSet/lockHospitalSet/${id}/${status}`,
      method: 'put'
    })
  },

  //(5)添加医院设置
  saveHospSet(hospitalSet){
    return request({
      url: `/admin/hosp/hospitalSet/saveHospitalSet`,
      method: 'post',
      data: hospitalSet
    })
  },

  //(6)根据医院id查询
  getHospSet(id){
    return request({
      url: `/admin/hosp/hospitalSet/${id}`,
      method: 'get'
    })
  },

  //(7)修改医院设置
  updateHospSet(hospitalSet){
    return request({
      url: `/admin/hosp/hospitalSet/updateHospitalSet`,
      method: 'post',
      data: hospitalSet
    })
  }
}
